package com.athu.study.Controller;

import dev.langchain4j.model.chat.ChatModel;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class MultiModelController {
    @Resource(name = "qwen")
    private ChatModel chatModelQwen;
    @Resource(name = "deepseek")
    private ChatModel chatModelDeepSeek;
    @GetMapping("/multimodel/qwen")
    public String MultiModelQwen(@RequestParam(value = "prompt",defaultValue = "你是谁")String prompt){
        return chatModelQwen.chat(prompt);
    }
    @GetMapping("/multimodel/deepseek")
    public String MultiModelDeepSeek(@RequestParam(value = "prompt",defaultValue = "你是谁")String prompt){
        return chatModelDeepSeek.chat(prompt);
    }

}
